#ifndef __usart_H
#define __usart_H

#include <stdint.h>
#include <stm32f10x.h>

#define HMI_USART_RX_BUF_NUM                    128
#define HMI_USART_TX_BUF_NUM                    128
#define CHART35_TIMEOUT_BUF_NUM    8

extern uint8_t Rxdata; 
extern uint8_t new_data_flag;
extern uint8_t hmi_usart_rx_data_buf[HMI_USART_RX_BUF_NUM];
extern uint8_t hmi_usart_rx_count;

void hmi_usart3_init(void);
void hmi_buf_clear(void);
//void hmi_usart_tx_data(uint8_t  *data_buf,  uint16_t length);
void hmi_usart_tx_date(float pressure, float temperature);
uint8_t* get_usart_rx_data_buf(void);
uint8_t  get_usart_rx_count(void);

void HMISends(char *buf1);
void HMISendb(u8 k);
void HMI_init(void);
#endif

